package com.seata.controller;

import com.seata.model.Order;
import com.seata.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: TongRui乀
 * @Date: 2019-12-05 17:10
 * @description：
 */
@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @PutMapping("createOrder")
    public Integer createOrder(@RequestBody Order order){
        return this.orderService.createOrder(order);
    }

}
